<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>牧心农业</title>
    <link rel="stylesheet" type="text/css" href="/static/css/eui.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/mobile.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/iconfont.css" />
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/doT.min.js"></script>
    <script src="/static/js/func.js"></script>
</head>
<body>
    <div class="content margin_top_foot">
        <header class="header fixed_top bg_mx_green"></header>
        <div class="lists bg_white margin_b_10"></div>
        <div class="bg_mx_green margin_b_10 text_center lineheight_3" onclick="location.href='<{url route='person/farmer-info'}>'">添加新农户</div>
        <div class="bg_mx_green text_center lineheight_3" onclick="location.href='<{url route='person/delivery-plan'}>'">上报投放计划</div>
        <footer class="foot_tab fixed_bottom mx_green font_16"></footer>
    </div>
    <script type="text/template" charset="utf-8" id='list_template'>
        {{for(var i=0;i<it.length;i++){}}
        <div class="padding_15 border_b v_center">
            <div class="width_100">
                <img class="fit_img2" src="{{=it[i].img}}" alt="">
            </div>
            <div class="left_100 padding_l_15">
                <div class="v_center font_12">
                    <div class="left_70">
                        <div><span class="light">农户：</span><span class="mx_green">{{=it[i].name}}</span></div>
                        <div><span class="light">负责人：</span><span class="mx_green">{{=it[i].owner}}</span></div>
                        <div><span class="light">地址：</span><span class="mx_green">{{=it[i].address}}</span></div>
                        <div><span class="light">状态：</span><span class="mx_green">{{=it[i].stat}}</span></div>
                    </div>
                    <div class="width_70 text_center">
                        <div class="lineheight_3 warning">代养{{=it[i].status}}头</div>
                        <div class="bg_mx_green border_mx_green circle_5 margin_b_10" onclick="location.href='{{=it[i].url}}'">管理</div>
                        {{if(it[i].house == undefined){}}
                            <div class="label_mx_green circle_5" onclick="location.href='{{=it[i].houseurl}}'">申请农家乐</div>
                        {{}else{}}
                            <div class="label_mx_green circle_5" onclick="location.href='{{=it[i].houseurl}}'">维护资料</div>
                        {{}}}
                    </div>
                </div>
            </div>
        </div>
        {{}}}
    </script>
    <script>
        // 栏目模版
            var lists = <{$farmers}>;
            var evallist = doT.template($("#list_template").text());
            loaddata(".lists",evallist,lists)
        // 页面初始化
            loadheadbar("农户管理",1);
            loadbfootbar()
    </script>
</body>
</html>
